package com.kxf.androidtestdemo.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class ActivityResultCallbackBean implements Parcelable {
    private int code;
    private String resultStr;

    public ActivityResultCallbackBean() {
    }

    protected ActivityResultCallbackBean(Parcel in) {
        code = in.readInt();
        resultStr = in.readString();
    }

    public static final Creator<ActivityResultCallbackBean> CREATOR = new Creator<ActivityResultCallbackBean>() {
        @Override
        public ActivityResultCallbackBean createFromParcel(Parcel in) {
            return new ActivityResultCallbackBean(in);
        }

        @Override
        public ActivityResultCallbackBean[] newArray(int size) {
            return new ActivityResultCallbackBean[size];
        }
    };

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getResultStr() {
        return resultStr;
    }

    public void setResultStr(String resultStr) {
        this.resultStr = resultStr;
    }

    @Override
    public String toString() {
        return "ActivityResultCallbackBean{" +
                "code=" + code +
                ", resultStr='" + resultStr + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(code);
        dest.writeString(resultStr);
    }
}
